<script setup>
  // 父传子的元素
  defineProps(['todoCount'])

  // 子传父的内容
  const emits = defineEmits()


</script>
<template>
  <footer class="footer">
    <span class="todo-count"><strong>{{ todoCount }}</strong> item left</span>
    <ul class="filters">
      <li>
        <a
          href="#/"
          class="selected"
        >All</a>
      </li>
      <li>
        <a href="#/active">Active</a>
      </li>
      <li>
        <a href="#/completed">Completed</a>
      </li>
    </ul>
    <button class="clear-completed" @click="emits('clear-completed')">
      Clear completed
    </button>
  </footer>
</template>